package com.pxmeta.party.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.pxmeta.party.entity.Association;
import com.pxmeta.party.entity.dto.CreateAssociationDTO;
import com.pxmeta.party.entity.vo.AssociationDetailVO;

import java.util.List;

public interface IAssociationService extends IService<Association> {

    List<Association> getRankingList();

    AssociationDetailVO getAssociationDetail(Long userId, Long associationId);

    Association getUserAssociation(Long userId);

    /**
     * 解约主播
     * @param anchorId
     */
    void breakAnchor(Long userId, Long anchorId, Long associationId);

    /**
     * 解约公会
     * @param userId
     * @param associationId
     */
    void breakAssociation(Long userId, Long associationId);

    /**
     * 解散公会
     * @param userId
     */
    void dissolutionAssociation(Long userId);


    /**
     * 创建公会
     * @param dto
     */
    void createAssociation(CreateAssociationDTO dto);

    /**
     * 分页获取公会列表
     * @return
     */
    Page<Association> getAssociationPage(Integer page, Integer size);

    void deleteById(Long id);

    /**
     * 更新会长
     * @param associationId
     * @param ownerId
     */
    void updateOwner(Long associationId, String ownerId);
}
